﻿Imports System.Windows.Forms
Imports System.IO

Public Class MDILitigioso

#Region "Eventos del Formulario"

    Private Sub MDILitigioso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        '+------------------------------------------------------------------------+
        '! Selecciona la imagen de fondo dependiendo de la resolución de pantalla !
        '+------------------------------------------------------------------------+
        Select Case My.Computer.Screen.Bounds.Width
            Case 640
                Me.BackgroundImage = My.Resources.LitigiosoNET_640_480
            Case 800
                Me.BackgroundImage = My.Resources.LitigiosoNET_800_600
            Case 1024
                Me.BackgroundImage = My.Resources.LitigiosoNET_1024_768
            Case Else
                Me.BackgroundImage = My.Resources.LitigiosoNET_1280_1024
        End Select

        '+-----------------------------------------------+
        '! Ejecuta esquema de Seguridad según el usuario !
        '+-----------------------------------------------+
        gs_Usuario = File.ReadAllText("C:\InitSys.log")
        gs_Usuario = Trim(Replace(gs_Usuario, Chr(34), ""))
        If gs_Usuario.Trim = "" Then
            MessageBox.Show("Ejecución NO autorizada del sistema")
            Me.Close()
        End If
        ToolStripStatusLabel.Text = "Usuario: " & gs_Usuario.Trim
        ' FALTA: agregar validación de usuario y cargar los datos de SEG_SEGURIDAD
        gs_Sistema_Nombre = "Litigioso_NET"
        gs_Maquina = My.Computer.Name
        gs_Pantalla = ""
    End Sub


    ' ***************************************************************************
    ' **************************   Submenu  Procesos   **************************
    ' ***************************************************************************



    ' ***************************************************************************
    ' **************************   Submenu Consultas   **************************
    ' ***************************************************************************



    ' ***************************************************************************
    ' **************************   Submenu Catalogos   **************************
    ' ***************************************************************************

    Private Sub AnomaliasToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnomaliasToolStripMenuItem.Click
        FrmAnomalias.Show()
    End Sub

    Private Sub AreasToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AreasToolStripMenuItem.Click
        FrmAreas.Show()
    End Sub

    Private Sub CausasInterrupciónDePrescripciónToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CausasInterrupciónDePrescripciónToolStripMenuItem.Click
        FrmCausas_Interrupcion.Show()
    End Sub

    Private Sub DelitosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DelitosToolStripMenuItem.Click
        FrmDelitos.Show()
    End Sub

    Private Sub EstadosProcesalesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EstadosProcesalesToolStripMenuItem.Click
        FrmEstados_Procesales.Show()
    End Sub

    Private Sub JuzgadosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles JuzgadosToolStripMenuItem.Click
        FrmJuzgados.Show()
    End Sub

    Private Sub MateriaTipoAsuntoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MateriaTipoAsuntoToolStripMenuItem.Click
        FrmMateriaTipoAsunto.Show()
    End Sub

    Private Sub ParámetrosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ParámetrosToolStripMenuItem.Click
        FrmParametros.Show()
    End Sub

    Private Sub ParticipaciónDelEstadoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ParticipaciónDelEstadoToolStripMenuItem.Click
        FrmParticipacion_Estado.Show()
    End Sub

    Private Sub ProcuradoresToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ProcuradoresToolStripMenuItem.Click
        FrmProcuradores.Show()
    End Sub

    Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem1.Click
        FrmTerrenos_Afectados.Show()
    End Sub

    Private Sub TiposDeExpedienteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TiposDeExpedienteToolStripMenuItem.Click
        FrmTipos_Expediente.Show()
    End Sub

    Private Sub TiposDeMonedaToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TiposDeMonedaToolStripMenuItem.Click
        FrmTipos_Moneda.Show()
    End Sub

    Private Sub TiposDeNegociaciónToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TiposDeNegociaciónToolStripMenuItem.Click
        FrmTipos_Negociacion.Show()
    End Sub

    ' ***************************************************************************
    ' ****************************   Submenu Salir   ****************************
    ' ***************************************************************************

    Private Sub SalirToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SalirToolStripMenuItem.Click
        Me.Close()
    End Sub


#End Region

End Class
